<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>后台管理中心</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" type="text/css" href="__STATIC__/larry_layui/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="__STATIC__/larry_layui/css/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="__STATIC__/larry_layui/css/adminstyle.css" media="all">
	<link rel="stylesheet" href="__STATIC__/icon/icon.css">	
	<style type="text/css">.left_menu{display:none;}.layui-tab-title .layui-this .fa-refresh:hover{background:orange;padding:2px;border-radius:100%;color:#fff;}</style>
</head>
<body>
<style type="text/css">
.layui-larry-menu ul.layui-nav  li.more_menu dl{
	background:#fff;
}
.layui-larry-menu ul.layui-nav  li.more_menu dl a{
	color:#333;
	line-height:35px;
}
</style>
<div class="layui-layout layui-layout-admin" id="layui_layout">
	<!-- 顶部区域 -->
	<div class="layui-header header header-demo">
		<div class="layui-main">
		    <!-- logo区域 -->
			<div class="admin-logo-box">
				<a class="logo" href="{:urls('index/sysinfo')}" onclick="$('#admin-home').trigger('click')" target="main-iframe" title="logo">后台管理中心</a>
				<div class="larry-side-menu">
					<i class="fa fa-bars" aria-hidden="true"></i>
				</div>
			</div>
            <!-- 顶级菜单区域 -->
            <div class="layui-larry-menu">
                 <ul class="layui-nav clearfix">
				 {volist name="base_menu" id="vo"}
                       <li class="top-menu layui-nav-item {eq name='$i' value='1'}layui-this{/eq}" onclick="choose_menu('{$key}')">
                 	   	   <a href="javascript:;"><i class="{$vo.icon|default='fa fa-list-ul'}"></i>{$vo.title}</a>
                 	   </li>
                 {/volist}
					 <li class="layui-nav-item more_menu">
						<a href="javascript:;"><i class="fa fa-hand-o-right"></i>更多　
						</a>
						  <dl class="layui-nav-child">
						{volist name="base_menu" id="vo"}
							<dd onclick="choose_menu('{$key}')"><a href="javascript:;"><i class="{$vo.icon|default='fa fa-list-ul'}"></i>{$vo.title}</a></dd>
						{/volist}
						  </dl>
					</li>
                 </ul>
            </div>
            <!-- 右侧导航 -->
            <ul class="layui-nav larry-header-item">
            		<li class="layui-nav-item">
            			账户名：{$userdb.username} ({$userdb.groupid|getGroupByid})
            		</li>
            		<li class="layui-nav-item first">
						<a href="javascript:;">			
							<cite>终端切换</cite>
							<span class="layui-nav-more"></span>
						</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="{:get_url('home')}?in=wap" target="_blank">WAP前台</a>
							</dd>
							<dd>
								<a href="{:get_url('home')}?in=pc" target="_blank">PC前台</a>
							</dd>
							<dd>
								<a href="{:get_url('member')}?in=wap" target="_blank">WAP会员中心</a>
							</dd>
							<dd>
								<a href="{:get_url('member')}?in=pc" target="_blank">PC会员中心</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="/" target="_blank" id="lock">
                        <i class="fa fa-fw fa-desktop"></i>
						前台</a>
					</li>
					<li class="layui-nav-item">
						<a href="{:urls('index/quit')}">
                        <i class="fa fa-fw fa-power-off"></i>
						退出</a>
					</li>
            </ul>
		</div>
	</div>
	<!-- 左侧侧边导航开始 -->
	<div class="layui-side layui-side-bg layui-larry-side" id="larry-side">
        <div class="layui-side-scroll" id="larry-nav-side" lay-filter="side">
		
		<!-- 左侧菜单 -->
		<ul class="layui-nav layui-nav-tree">
			<li class="layui-nav-item layui-this">
				<a href="javascript:;" data-url="{:urls('welcome')}">
				    <i class="fa fa-fw fa-home" data-icon='icon-home1'></i>
					<span>后台首页</span>
				</a>
			</li>
{volist name="base_menu" id="vo"}		
			<!-- 1级分类开始 -->
			<em class="left_menu" data-type="{$key}">
			{volist name="vo.sons" id="ar"}
			<li class="layui-nav-item {eq name='$key' value='0'}layui-nav-itemed{/eq}">
				<a href="javascript:;">
					<i class="{$ar.icon|default='fa fa-sun-o'}" ></i>
					<span>{$ar.title}</span>
					<em class="layui-nav-more"></em>
				</a>
				<dl class="layui-nav-child">
					<!-- 2级分类开始 -->
					{volist name="ar.sons" id="rs"}
                    <dd>
                        <a href="javascript:;" data-url="{$rs.url}">
                            <i class="{$rs.icon|default='glyphicon glyphicon-menu-right'}" data-icon='fa fa-refresh'></i>
                            <span>{$rs.title}</span>
                        </a>
                    </dd>
                    {/volist}
					<!-- 2级分类结束 -->
                </dl>
			</li>
			{/volist}
			</em>
			<!-- 1级分类结束 -->
			
{/volist}
			</ul>
	    </div>
	</div>

	<!-- 左侧侧边导航结束 -->
	<!-- 右侧主体内容 -->
	<div class="layui-body" id="larry-body" style="bottom: 0;border-left: solid 2px #2299ee;">
		<div class="layui-tab layui-tab-card larry-tab-box" id="larry-tab" lay-filter="demo" lay-allowclose="true">
			<div class="go-left key-press pressKey" id="titleLeft" title="滚动至最右侧"><i class="larry-icon larry-weibiaoti6-copy"></i> </div>
			<ul class="layui-tab-title">
				<li class="layui-this" id="admin-home"><i class="fa fa-fw fa-home"></i><em>后台首页</em></li>
			</ul>
			<div class="go-right key-press pressKey" id="titleRight" title="滚动至最左侧"><i class="larry-icon larry-right"></i></div> 
			<ul class="layui-nav closeBox">
				  <li class="layui-nav-item">
				    <a href="javascript:;"><i class="fa fa-fw fa-cog"></i> 页面操作</a>
				    <dl class="layui-nav-child">
					  <dd><a href="javascript:;" class="refresh refreshThis"><i class="fa fa-fw fa-refresh"></i> 刷新当前</a></dd>
					  <dd><a href="javascript:;" class="refresh refreshAll"><i class="fa fa-fw fa-refresh"></i> 刷新所有</a></dd>
				      <dd><a href="javascript:;" class="closePageOther"><i class="fa fa-fw fa-hand-rock-o"></i> 关闭其他</a></dd>
				      <dd><a href="javascript:;" class="closePageAll"><i class="fa fa-fw fa-power-off"></i> 关闭全部</a></dd>
				    </dl>
				  </li>
				</ul>
			<div class="layui-tab-content" style="min-height: 150px; ">
				<div class="layui-tab-item layui-show">
					<iframe class="larry-iframe" name="main-iframe" data-id='0' src="{:urls('welcome')}"></iframe>
				</div>
			</div>
		</div>
	</div>
	<!-- 底部区域 -->
	<div class="layui-footer layui-larry-foot" id="larry-footer">
		<div class="layui-mian">  
		    <p class="p-admin">
		    	Powered by <a href="http://www.php168.com" target="_blank">qibosoft</a> X1.0 Code ©2003-2021
		    </p>
		</div>
	</div>
</div>
    <script type="text/javascript" src="__STATIC__/js/core/jquery.min.js"></script>
	<script type="text/javascript" src="__STATIC__/larry_layui/layui/layui.js"></script> 
	<script type="text/javascript" src="__STATIC__/larry_layui/js/larry.js"></script>
	<script type="text/javascript" src="__STATIC__/larry_layui/js/index.js"></script>
	
<script type="text/javascript">
$('.closePageAll').click(function(){
	$(".layui-tab-title>li").each(function(i){
		if(i>0){
			$(this).find('.layui-tab-close').trigger("click");
		}		
	});
});
$('.closePageOther').click(function(){
	$(".layui-tab-title>li").each(function(i){
		if(i>0 && $(this).hasClass('layui-this')==false){
			$(this).find('.layui-tab-close').trigger("click");
		}		
	});
});
$('.refreshThis').click(function(){
	$(".layui-tab-content .layui-show").each(function(i){
		//if( $(this).hasClass('layui-show') ){
			var url = $(this).children('iframe').contents().get(0).location.href;
			$(this).children('iframe').contents().get(0).location.href=url;
			//var url = $(this).children('iframe').attr('src');
			//$(this).children('iframe').attr('src',url);
		//}		
	});
});
$('.refreshAll').click(function(){
	$(".layui-tab-content .layui-tab-item").each(function(i){
		var url = $(this).children('iframe').attr('src');
		$(this).children('iframe').attr('src',url);	
	});
});

 
$(window).on('resize', function() {
	$(".layui-larry-menu .top-menu").show();
	$(".more_menu .layui-nav-child dd").show();
	menu_show_set();
});
$(function(){
	menu_show_set();
});

function menu_show_set(){
	var max_width = $(".larry-header-item").offset().left-80;
	var j=0;
	var num=0;
	var ck=false;
	$(".layui-larry-menu .top-menu").each(function(){
		var left = $(this).offset().left+$(this).width();
		if(left>max_width&&!ck){
			ck=true;
			num = j;			
		}else{
			j++;
		}
		if(ck){
			$(this).hide();
		}
	});
	if(num==0){
		$(".more_menu").hide();
	}else{
		$(".more_menu .layui-nav-child dd").each(function(i){
			if(i<num)$(this).hide();
		});
	}	
}
</script>
<!-- 锁屏插件
<div class="lock-screen" style="display: none;">
	<div id="locker" class="lock-wrapper">
		<div id="time"></div>
		<div class="lock-box center">
			<img src="{$userdb.uid|get_user_icon}" alt="">
			<h1>{$userdb.username}</h1>
			<duv class="form-group col-lg-12">
				<input type="password" placeholder='锁屏状态，请输入密码解锁' id="lock_password" class="form-control lock-input" autofocus name="lock_password">
				<button id="unlock" class="btn btn-lock">解锁</button>
			</duv>
		</div>
	</div>
</div>
-->

</body>
</html>